/**
 * @projectName study-note
 * @package Visitor
 * @className Visitor.ConcreteVisitorA
 */
package Visitor;

/**
 * ConcreteVisitorA
 * @description 具体访问者
 * @author answer_wx
 * @date 2022/7/6 16:50
 * @version 1.0
 */
public class ConcreteVisitorA extends AbstractVisitor {
    public ConcreteVisitorA(String name) {
        super(name);
    }

    @Override
    public void visitorConcreteElementA(ConcreteElementA concreteElementA) {
        System.out.println(String.format("%s被%s访问", concreteElementA.name, this.name));
    }

    @Override
    public void visitorConcreteElementB(ConcreteElementB concreteElementB) {
        System.out.println(String.format("%s被%s访问", concreteElementB.name, this.name));
    }
}